Skip to content

Conversation

rs-sac
Copy link

@rs-sac rs-sac commented Oct 2, 2024

The warning makes sense at the top level because it indicates a user misconfiguration, but the warning can also fire when a macro reduces max_width within its scope, which is confusing. We can plumb a flag through saying whether to warn or not and have the macro-related twiddling disable the warning, which will still be on at the top level.


This change allows setting, e.g., struct_lit_width to the same value as max_width without getting incorrect warnings within macro scopes. The bug related to macros has been previously acknowledged, and a previous fix was attempted. I attempt to fix the same problem, but my patch takes an approach different from deleting the warning.

Related:

The warning makes sense at the top level because it indicates a user
misconfiguration, but the warning can also fire when a macro reduces
max_width within its scope, which is confusing.  We can plumb a flag
through saying whether to warn or not and have the macro-related
twiddling disable the warning, which will still be on at the top level.
@ytmimi
Copy link
Contributor

ytmimi commented Oct 7, 2024

@rs-sac I don't think suppressing the warning is the approach we should take here. I think it would be better to clap all other width settings to the max_width

@ytmimi ytmimi closed this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants